import { request } from "@umijs/max";;
import { UMS_REQUEST_PREFIX } from "@/utils/config";
import {  } from "@/constants/types";

// 账号资金
/**
 * 账户流水列表接口
 * @returns 
 */
export async function accountFlowList(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/accountFlow/list`, {
    method: 'POST',
    data: params,
    dataField: 'data'
  });
}
/**
 * 账户流水TABNUM
 * @returns 
 */
export async function accountFlowTabNum(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/accountFlow/tabNum`, {
    method: 'POST',
    data: params,
    dataField: 'data'
  });
}
/**
 * 添加流水
 * @returns 
 */
export async function accountFlowAdd(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/accountFlow/add`, {
    method: 'POST',
    data: params,
  });
}
/**
 * 确认流水
 * @returns 
 */
export async function accountFlowConfirm(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/accountFlow/confirm`, {
    method: 'POST',
    data: params,
  });
}
// 收款记录
/**
 * 收款列表
 * @returns 
 */
export async function paymentList(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/payment/list`, {
    method: 'POST',
    data: params,
    dataField: 'data'
  });
}
/**
 * 新建收款记录
 * @returns 
 */
export async function paymentAdd(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/payment/add`, {
    method: 'POST',
    data: params,
  });
}
/**
 * 收款记录详情
 * @returns 
 */
export async function paymentDetail(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/payment/detail`, {
    method: 'POST',
    data: params,
    dataField: 'data'
  });
}
// 收款记录
/**
 * 账单列表接口
 * @returns 
 */
export async function billList(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/bill/list`, {
    method: 'POST',
    data: params,
    dataField: 'data'
  });
}
/**
 * 账单TABNUM
 * @returns 
 */
export async function billTabNum(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/bill/tabNum`, {
    method: 'POST',
    data: params,
    dataField: 'data'
  });
}
/**
 * 创建账单
 * @returns 
 */
export async function billAdd(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/bill/add`, {
    method: 'POST',
    data: params,
  });
}
/**
 * 账单详情
 * @returns 
 */
export async function billDetail(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/bill/detail`, {
    method: 'POST',
    data: params,
    dataField: 'data'
  });
}
/**
 * 更新账单
 * @returns 
 */
export async function billUpdate(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/bill/update`, {
    method: 'POST',
    data: params,
  });
}
/**
 * 批量确认
 * @returns 
 */
export async function billBatchConfirm(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/bill/batchConfirm`, {
    method: 'POST',
    data: params,
  });
}
/**
 * 核销预览
 * @returns 
 */
export async function billWriteOffPreview(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/bill/writeOffPreview`, {
    method: 'POST',
    data: params,
  });
}
/**
 * 核销
 * @returns 
 */
export async function billWriteOff(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/bill/writeOff`, {
    method: 'POST',
    data: params,
  });
}
/**
 * 批量导出
 * @returns 
 */
export async function billBatchExport(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/bill/batchExport`, {
    method: 'POST',
    data: params,
    dataField: 'data'
  });
}
/**
 * 单个导出
 * @returns 
 */
export async function billSingleExport(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/bill/singleExport`, {
    method: 'POST',
    data: params,
    dataField: 'data'
  });
}
/**
 * 账户流水所有列表
 * @returns 
 */
export async function queryAllByCustomerCode(params: any) {
  return request(`${UMS_REQUEST_PREFIX}/fms/accountFlow/queryAllByCustomerCode`, {
    method: 'POST',
    data: params,
    dataField: 'data'
  });
}